package com.easymin.weixin.controller.v5.utils;

import com.easymin.weixin.common.api.DaijiaApi;

/**
 * 更新通知已读线程
 * @author zane
 *
 */
public class NoticeWorker implements Runnable {

	private String [] noticeIds;

	private String server;

	private Long passengerId;

	private DaijiaApi daijiaApi;
	

	public NoticeWorker(String server, String [] noticeIds, Long passengerId, DaijiaApi daijiaApi) {
		this.server = server;
		this.noticeIds = noticeIds;
		this.passengerId = passengerId;
		this.daijiaApi = daijiaApi;
	}

	@Override
	public void run() {
		if (null != noticeIds && noticeIds.length > 0) {
			for (String id : noticeIds) {
				daijiaApi.updateNoticeRead(server, passengerId, Long.parseLong(id));
			}
		}
	}
}
